package cn.lmxdev.ptms.dao;

import cn.lmxdev.ptms.bean.table.TTopic;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ITopicDao {
    /* 插入 */
    boolean insert(@Param(value = "topic") TTopic topic);

    /* 删除 */
    boolean delete(@Param(value = "id") Long id);

    /* 更新 */
    boolean update(@Param(value = "topic") TTopic topic);

    /* 查询 */
    TTopic find(@Param(value = "id") Long id);

    /* 计数 */
    long count(@Param(value = "topic") TTopic topic);

    /* 查询列表 */
    List<TTopic> select(@Param(value = "limitStart") Long limitStart, @Param(value = "limitEnd") Long limitEnd, @Param(value = "topic") TTopic topic);

    /* 专业负责人计数 */
    long specialtyHeadCount(@Param(value = "specialtyHeadId") Long specialtyHeadId, @Param(value = "topic") TTopic topic);

    /* 专业负责人查询列表 */
    List<TTopic> specialtyHeadSelect(@Param(value = "specialtyHeadId") Long specialtyHeadId, @Param(value = "limitStart") Long limitStart, @Param(value = "limitEnd") Long limitEnd, @Param(value = "topic") TTopic topic);

    /* 指导老师计数 */
    long adviserCount(@Param(value = "adviserId") Long adviserId, @Param(value = "topic") TTopic topic);

    /* 指导老师查询列表 */
    List<TTopic> adviserSelect(@Param(value = "adviserId") Long adviserId, @Param(value = "limitStart") Long limitStart, @Param(value = "limitEnd") Long limitEnd, @Param(value = "topic") TTopic topic);

    /* 学生计数 */
    long studentCount(@Param(value = "studentId") Long studentId, @Param(value = "topic") TTopic topic);

    /* 学生查询列表 */
    List<TTopic> studentSelect(@Param(value = "studentId") Long studentId, @Param(value = "limitStart") Long limitStart, @Param(value = "limitEnd") Long limitEnd, @Param(value = "topic") TTopic topic);

    /* 是否存在 */
    boolean has(@Param(value = "id") Long id);
}
